home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c++ / 282 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  2.6 KB

  1. Path: fido.asd.sgi.com!austern
  2. From: jgalt@infosoft.com (John Galt)
  3. Newsgroups: comp.std.c++
  4. Subject: Re: and, or, not
  5. Date: 05 Feb 1996 11:25:01 PST
  6. Organization: Infosoft Inc., Cupertino, CA, USA
  7. Approved: austern@isolde.mti.sgi.com
  8. Message-ID: <DMBG7p.H7z@infosoft.com>
  9. References: <1198@dawes.win.net>
  10. NNTP-Posting-Host: isolde.mti.sgi.com
  11. X-Original-Date: Mon, 5 Feb 1996 18:47:48 GMT
  12. Apparently-To: comp-std-c++@uunet.uu.net
  13. X-Auth: PGPMoose V1.1 PGP comp.std.c++
  14.     iQBVAwUBMRZZqUy4NqrwXLNJAQEpEgIApw6ZmlIAXVNZ4a+Y7goKgUMEfeOtoe9e
  15.     gZBRrerUzWBty1efNJpatliWZy8Au0iNRW6VgFQ9vXdJPiGFkxYVJg==
  16.     =B1nv
  17. Originator: austern@isolde.mti.sgi.com
  18.  
  19. In article <1198@dawes.win.net>, Beman Dawes <beman@dawes.win.net> wrote:
  20.  
  21. >  2.9  Keywords                                                [lex.key]
  22.  
  23. [snip]
  24.  
  25. >                   Table 4--alternative representations
  26.  
  27. >            +------------------------------------------------+
  28. >            |and      and_eq   bitand   bitor   compl    not |
  29. >            |not_eq   or       or_eq    xor     xor_eq       |
  30. >            +------------------------------------------------+
  31.  
  32. This leads to another question:
  33.  
  34. Assuming that the problem characters (those that don't exist on some keyboards,
  35. making the above names necessary) are &, |, !, ^, and ~,I wonder why they
  36. didn't create names for all the affected characters.  I would have done
  37. something like this:
  38.  
  39.   &&   and            &&=  and_eq [a]     &    bitand         &=   bitand_eq
  40.   ||   or             ||=  or_eq  [a]     |    bitor          |=   bitor_eq
  41.   !    not            !=   unequal [b]    ~    compl          ~=   compl_eq
  42.                                           ^    bitxor [c]     ^=   bitxor_eq [c]
  43.  
  44. [a]  In the draft, these names are not as shown here, but are given to the
  45.      operator at the end of the same row!  This inconsistency will confuse
  46.      users and should be changed now, before someone implements it.
  47.  
  48. [b]  Should not be called not_eq because it is not an assignment like the
  49.      other ones ending in "_eq".
  50.  
  51. [c]  Should begin with "bit" like the other bit operators.  If there were
  52.      logical-xor operators ^^ and ^^=, _those_ should be called xor and
  53.      xor_eq.  Those ought to exist.  Also, there ought to be shift-in-place
  54.      operators, <<= and >>=.
  55. --
  56. John David Galt                                I do not speak for my employer.
  57. jgalt@infosoft.com      Send personal mail to:  John_David_Galt@cup.portal.com
  58. ---
  59. [ comp.std.c++ is moderated.  Submission address: std-c++@ncar.ucar.edu.
  60.   Contact address: std-c++-request@ncar.ucar.edu.  The moderation policy is
  61.   in http://reality.sgi.com/employees/austern_mti/std-c++/policy.html. ]
  62.